package com.lagou.edu.controller;

import com.lagou.edu.bean.Position;
import com.lagou.edu.service.IPositionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 陶肖寅
 * @version V1.0
 * <p>
 *     请求访问层
 * date: 2020/10/8 11:06 上午
 * email:fromlx@126.com
 * @Copyright: 2020-2021 城云科技(中国)有限公司
 *
 * </p>
 */
@RestController
@RequestMapping
public class SolrController {
    @Autowired
    IPositionService positionService;

    @GetMapping("/solrQuery/{positionName}")
    public Object findBy(@PathVariable("positionName") String positionName)throws Exception{
        List<Position> query = positionService.query(positionName);
        return query;
    }
}
